package cn.rxls.community.controller;


import cn.rxls.community.result.Result;
import cn.rxls.community.vo.sysConfig.SysConfigVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.rxls.community.entity.SysConfig;
import cn.rxls.community.service.SysConfigService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 配置选项(SysConfig)表
 *
 */
@RestController
@RequestMapping("sysConfig")
@Validated
public class SysConfigController {
    /**
     * 服务对象
     */
    @Resource
    private SysConfigService sysConfigService;

    /**
     * 根据类型查询数据
     *
     * @param category 类型
     * @return 单条数据
     */
    @GetMapping("/category")
    public Result<String> selectDetailByCategory(@Valid @NotBlank(message = "类型不为空") @RequestParam("category") String category) {
        return Result.success(sysConfigService.selectDetailByCategory(category));
    }

}

